1. Field of the Invention
This invention relates to pattern recognition which is used for automating eye-sight inspections of products for example.
2. Description of the Related Art
FIG. 19 is a block diagram showing the structure of a conventional wafer surface defect inspection apparatus disclosed in television society bulletin "wafer surface defect inspection apparatus using Very-Large-Scale-Integrated circuit", Vol. 36, No. 1, pp 38-44. In FIG. 19, numeral 2 denotes a wafer to be inspected, numeral 3 denotes a moving mechanism which moves the wafer 2, numeral 4 denotes a microscope which magnifies the pattern image of the surface of wafer 2, numeral 5 denotes a Charge Coupled Device (CCD) camera which takes in the image of the wafer 2 magnified by the microscope 4, numeral 6 denotes a display which monitors the image taken in by CCD camera 5, numeral 20 denotes a flaw identifying circuit which identifies a flaw from the image taken in by CCD camera 5, numeral 11 denotes a display which displays an inspection result.
FIG. 20 is a flow chart showing the operation of the apparatus described above. At first, the image data of wafer 2 taken by CCD camera 5 are inputted to flaw identifying circuit 20 (step ST1). Then, flaw identifying circuit 20 differentiates the image data in pre-processing, changes the differentiated data into binary code, and processes boundary extraction (step ST2). Next, the circuit 20 sets matching frames A and B in the same screen of the differentiated binary image such that these frames are away from each other by the distance of the repetition of the pattern (step ST3). Next, the circuit 20 compares pixels in the frame A with pixels in the frame B on the basis of bit-by-bit relative to the frames (step ST4). If the values of pixels in corresponding positions are different each other (step ST5), a decision is made that either the frame A or the frame B contains a defect (step ST6). If the values are the same, a decision is made that each frame does not contain a defect (step ST7). A whole wafer is inspected by moving these matching frames A and B (step ST8).
However, it is impossible for the above described apparatus to identify which frame contains a defect because whether two patterns which are next to each other in the same wafer are different or not is merely judged. Further, the frame A and frame B must be placed such that the distance between the frame A and the frame B is the same as the repetition distance of the pattern. This requires a high precision in placing the frames A and B and it is difficult to obtain such high precision especially for fine patterns like semiconductor patterns. Moreover, because of differentiating the image and changing the image into a binary code, noise contained in the image or a change of lighting may cause a brightness value to be inverted and thereby a decision for defect may be wrongly made.